package com.rlj.messagequeue.mqserver.mapper;

import com.rlj.messagequeue.mqserver.core.Binding;
import com.rlj.messagequeue.mqserver.core.Exchange;
import com.rlj.messagequeue.mqserver.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description: 数据库建表操作
 * User: DELL
 * Date: 2024-02-22
 * Time: 0:16
 */

@Mapper
public interface MetaMapper {
    // 建表
    void createExchangeTable();

    void createQueueTable();

    void createBindingTable();

    // 交换机
    void insertExchange(Exchange exchange);

    void deleteExchange(String name);

    List<Exchange> selectAllExchanges();

    // 队列
    void insertQueue(MSGQueue queue);

    void deleteQueue(String name);

    List<MSGQueue> selectAllQueues();

    // 绑定
    void insertBinding(Binding binding);

    void deleteBinding(Binding binding);

    List<Binding> selectAllBindings();


}
